package world.snowcrystal.nova.model.enums;

import lombok.Getter;

@Getter
public enum AppScoringStrategyEnum {

    CUSTOM("自定义", 0),
    AI("AI", 1),
    ;

    private final String text;
    private final int value;


    AppScoringStrategyEnum(String text, int value) {
        this.value = value;
        this.text = text;
    }

    public static AppScoringStrategyEnum get(Integer value) {
        if (value == null) {
            return null;
        }
        for (AppScoringStrategyEnum e : AppScoringStrategyEnum.values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return null;
    }

}
